package com.itangcent.idea.plugin.api.export.yapi

import com.google.inject.Inject
import com.itangcent.common.kit.toJson
import com.itangcent.common.model.Request
import com.itangcent.idea.plugin.api.export.core.requestOnly
import com.itangcent.idea.plugin.settings.SettingBinder
import com.itangcent.idea.plugin.settings.Settings
import com.itangcent.idea.utils.SystemProvider
import com.itangcent.intellij.context.ActionContext
import com.itangcent.mock.ImmutableSystemProvider
import com.itangcent.mock.SettingBinderAdaptor
import com.itangcent.mock.toUnixString
import com.itangcent.test.TimeZoneKit.STANDARD_TIME
import org.junit.jupiter.api.condition.OS

/**
 * Test case of [YapiFormatter]
 */
internal abstract class YapiFormatterTest : YapiSpringClassExporterBaseTest() {

    @Inject
    protected lateinit var yapiFormatter: YapiFormatter

    protected val settings = Settings()

    override fun beforeBind() {
        super.beforeBind()
        settings.inferEnable = true
    }

    override fun bind(builder: ActionContext.ActionContextBuilder) {
        super.bind(builder)
        builder.bind(SystemProvider::class) {
            it.toInstance(ImmutableSystemProvider(STANDARD_TIME))
        }
        builder.bind(SettingBinder::class) {
            it.toInstance(SettingBinderAdaptor(settings))
        }
    }


    override fun customConfig(): String {
        return """${super.customConfig()}
                mock.[code|integer]=200
                mock.[msg|string]=ok
                mock.[*.name|string]=tangcent
                mock.[*.age|integer]=18
                mock.[*.sex|integer]=1
                mock.[*.*birth*|string]=@date
                mock.[*.*time*|string]=@datetime
                mock.[*|integer]=666
                mock.[*|string]=str
               """
    }

    override fun shouldRunTest(): Boolean {
        return !OS.WINDOWS.isCurrentOs
    }

    class YapiFormatterWithDefaultTest : YapiFormatterTest() {

        /**
         * use json-schema by default
         */
        fun testDoc2Items() {
            val requests = ArrayList<Request>()
            val boundary = actionContext.createBoundary()
            classExporter.export(userCtrlPsiClass, requestOnly {
                requests.add(it)
            })
            boundary.waitComplete(false)
            classExporter.export(defaultCtrlPsiClass, requestOnly {
                requests.add(it)
            })
            boundary.waitComplete()
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/ctrl/name\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"current ctrl name\",\"path\":\"/user/ctrl/name\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[0]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/greeting\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"say hello\",\"path\":\"/user/greeting\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"not update anything\",\"req_headers\":[],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":true,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p>not update anything</p>\"}]",
                yapiFormatter.doc2Items(requests[1]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/get/{id}\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"get user info\",\"path\":\"/user/get/{id}\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[\"deprecated\"],\"req_query\":[{\"name\":\"id\",\"value\":0,\"desc\":\"user id\",\"required\":0}],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"undone\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[2]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/admin/add\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"type\":\"static\",\"title\":\"create an user\",\"req_body_form\":[],\"req_body_is_json_schema\":true,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\",\"queryPath\":{\"params\":[]},\"path\":\"/user/add\"},{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/admin/add\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"type\":\"static\",\"title\":\"[admin]create an user\",\"req_body_form\":[],\"req_body_is_json_schema\":true,\"__v\":0,\"markdown\":\"[admin]\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"[admin]<p></p>\",\"queryPath\":{\"params\":[],\"path\":\"/user/add\"},\"path\":\"/user/admin/add\"}]",
                yapiFormatter.doc2Items(requests[3]).toJson()
            )
            val apiCntInUserCtrl = userCtrlPsiClass.methods.size
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/ctrl/name\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"current ctrl name\",\"path\":\"/default/ctrl/name\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 1]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/query\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"call with query\",\"path\":\"/default/query\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[{\"name\":\"intArr[0]\",\"value\":123,\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"intArr[1]\",\"value\":456,\"example\":\"456\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.abc\",\"value\":\"123\",\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.def\",\"value\":\"456\",\"example\":\"456\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[0]\",\"value\":\"abc\",\"example\":\"abc\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[1]\",\"value\":\"123\",\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"invalid[0]\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldBeFirst\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.str\",\"value\":\"\",\"desc\":\"string field\",\"required\":0},{\"name\":\"model.integer\",\"value\":0,\"desc\":\"integer field\",\"required\":0},{\"name\":\"model.stringList\",\"value\":\"abc\",\"example\":\"abc\",\"desc\":\"stringList field\",\"required\":0},{\"name\":\"model.integerArray[0]\",\"value\":0,\"desc\":\"integerArray field\",\"required\":0},{\"name\":\"model.shouldIgnore\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldIgnoreByGetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldIgnoreBySetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldBeLast\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.s\",\"value\":\"aaa\",\"example\":\"aaa\",\"desc\":\"\",\"required\":0},{\"name\":\"model.s2\",\"value\":\"bbb\",\"example\":\"bbb\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldBeFirst\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].str\",\"value\":\"\",\"desc\":\"string field\",\"required\":0},{\"name\":\"modelList[0].integer\",\"value\":0,\"desc\":\"integer field\",\"required\":0},{\"name\":\"modelList[0].stringList[0]\",\"value\":\"\",\"desc\":\"stringList field\",\"required\":0},{\"name\":\"modelList[0].integerArray[0]\",\"value\":0,\"desc\":\"integerArray field\",\"required\":0},{\"name\":\"modelList[0].shouldIgnore\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldIgnoreByGetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldIgnoreBySetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldBeLast\",\"value\":\"\",\"desc\":\"\",\"required\":0}],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 2]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/form\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"form\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"call with form\",\"req_body_form\":[{\"name\":\"intArr[0]\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"intArr[1]\",\"example\":\"456\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.abc\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.def\",\"example\":\"456\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[0]\",\"example\":\"abc\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[1]\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"invalid[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldBeFirst\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.str\",\"type\":\"text\",\"required\":0,\"desc\":\"string field\"},{\"name\":\"model.integer\",\"type\":\"text\",\"required\":0,\"desc\":\"integer field\"},{\"name\":\"model.stringList\",\"example\":\"abc\",\"type\":\"text\",\"required\":0,\"desc\":\"stringList field\"},{\"name\":\"model.integerArray[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"integerArray field\"},{\"name\":\"model.shouldIgnore\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldIgnoreByGetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldIgnoreBySetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldBeLast\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.s\",\"example\":\"aaa\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.s2\",\"example\":\"bbb\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldBeFirst\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].str\",\"type\":\"text\",\"required\":0,\"desc\":\"string field\"},{\"name\":\"modelList[0].integer\",\"type\":\"text\",\"required\":0,\"desc\":\"integer field\"},{\"name\":\"modelList[0].stringList[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"stringList field\"},{\"name\":\"modelList[0].integerArray[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"integerArray field\"},{\"name\":\"modelList[0].shouldIgnore\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldIgnoreByGetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldIgnoreBySetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldBeLast\",\"type\":\"text\",\"required\":0,\"desc\":\"\"}],\"path\":\"/default/form\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"multipart/form-data\",\"example\":\"multipart/form-data\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 3]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/body\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"type\":\"static\",\"title\":\"call with body\",\"req_body_form\":[],\"path\":\"/default/body\",\"req_body_is_json_schema\":true,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 4]).toJson()
            )
        }

        /**
         * use json-schema by default
         */
        fun testDoc2ItemsWithoutExpanded() {
            settings.formExpanded = false
            settings.queryExpanded = false
            val requests = ArrayList<Request>()
            val boundary = actionContext.createBoundary()
            classExporter.export(userCtrlPsiClass, requestOnly {
                requests.add(it)
            })
            boundary.waitComplete(false)
            classExporter.export(defaultCtrlPsiClass, requestOnly {
                requests.add(it)
            })
            boundary.waitComplete()
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/ctrl/name\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"current ctrl name\",\"path\":\"/user/ctrl/name\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[0]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/greeting\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"say hello\",\"path\":\"/user/greeting\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"not update anything\",\"req_headers\":[],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":true,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p>not update anything</p>\"}]",
                yapiFormatter.doc2Items(requests[1]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/get/{id}\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"get user info\",\"path\":\"/user/get/{id}\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[\"deprecated\"],\"req_query\":[{\"name\":\"id\",\"value\":0,\"desc\":\"user id\",\"required\":0}],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"undone\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[2]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/admin/add\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"type\":\"static\",\"title\":\"create an user\",\"req_body_form\":[],\"req_body_is_json_schema\":true,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\",\"queryPath\":{\"params\":[]},\"path\":\"/user/add\"},{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/admin/add\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"type\":\"static\",\"title\":\"[admin]create an user\",\"req_body_form\":[],\"req_body_is_json_schema\":true,\"__v\":0,\"markdown\":\"[admin]\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"[admin]<p></p>\",\"queryPath\":{\"params\":[],\"path\":\"/user/add\"},\"path\":\"/user/admin/add\"}]",
                yapiFormatter.doc2Items(requests[3]).toJson()
            )
            val apiCntInUserCtrl = userCtrlPsiClass.methods.size
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/ctrl/name\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"current ctrl name\",\"path\":\"/default/ctrl/name\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 1]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/query\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"call with query\",\"path\":\"/default/query\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[{\"name\":\"intArr\",\"value\":\"[123, 456]\",\"example\":\"[123, 456]\",\"desc\":\"\",\"required\":0},{\"name\":\"amount\",\"value\":\"{\\\"abc\\\":\\\"123\\\",\\\"def\\\":\\\"456\\\"}\",\"example\":\"{\\\"abc\\\":\\\"123\\\",\\\"def\\\":\\\"456\\\"}\",\"desc\":\"\",\"required\":0},{\"name\":\"strings\",\"value\":\"[\\\"abc\\\",\\\"123\\\"]\",\"example\":\"[\\\"abc\\\",\\\"123\\\"]\",\"desc\":\"\",\"required\":0},{\"name\":\"invalid\",\"value\":\"[\\\"abc\\\",\\\"123\\\"}\",\"example\":\"[\\\"abc\\\",\\\"123\\\"}\",\"desc\":\"\",\"required\":0},{\"name\":\"model\",\"value\":\"{\\\"s\\\":\\\"aaa\\\",\\\"s2\\\":\\\"bbb\\\",\\\"stringList\\\":\\\"abc\\\"}\",\"example\":\"{\\\"s\\\":\\\"aaa\\\",\\\"s2\\\":\\\"bbb\\\",\\\"stringList\\\":\\\"abc\\\"}\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList\",\"value\":\"[{\\\"s\\\":\\\"aaa\\\",\\\"s2\\\":\\\"bbb\\\",\\\"stringList\\\":\\\"abc\\\"}}\",\"example\":\"[{\\\"s\\\":\\\"aaa\\\",\\\"s2\\\":\\\"bbb\\\",\\\"stringList\\\":\\\"abc\\\"}}\",\"desc\":\"\",\"required\":0}],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 2]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/form\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"form\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"call with form\",\"req_body_form\":[{\"name\":\"intArr\",\"example\":\"[123, 456]\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount\",\"example\":\"{\\\"abc\\\":\\\"123\\\",\\\"def\\\":\\\"456\\\"}\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings\",\"example\":\"[\\\"abc\\\",\\\"123\\\"]\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"invalid\",\"example\":\"[\\\"abc\\\",\\\"123\\\"}\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model\",\"example\":\"{\\\"s\\\":\\\"aaa\\\",\\\"s2\\\":\\\"bbb\\\",\\\"stringList\\\":\\\"abc\\\"}\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList\",\"example\":\"[{\\\"s\\\":\\\"aaa\\\",\\\"s2\\\":\\\"bbb\\\",\\\"stringList\\\":\\\"abc\\\"}}\",\"type\":\"text\",\"required\":0,\"desc\":\"\"}],\"path\":\"/default/form\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"multipart/form-data\",\"example\":\"multipart/form-data\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 3]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/body\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"type\":\"static\",\"title\":\"call with body\",\"req_body_form\":[],\"path\":\"/default/body\",\"req_body_is_json_schema\":true,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 4]).toJson()
            )
        }

        /**
         * use json5
         */
        fun testDoc2ItemsWithJson5() {
            settings.yapiReqBodyJson5 = true
            settings.yapiResBodyJson5 = true
            val requests = ArrayList<Request>()
            val boundary = actionContext.createBoundary()
            classExporter.export(userCtrlPsiClass, requestOnly {
                requests.add(it)
            })
            boundary.waitComplete(false)
            classExporter.export(defaultCtrlPsiClass, requestOnly {
                requests.add(it)
            })
            boundary.waitComplete()
            assertEquals(
                "[{\"res_body\":\"\\\"\\\"\",\"query_path\":{\"path\":\"/user/ctrl/name\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"current ctrl name\",\"path\":\"/user/ctrl/name\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[0]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"\\\"\\\"\",\"query_path\":{\"path\":\"/user/greeting\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"say hello\",\"path\":\"/user/greeting\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"not update anything\",\"req_headers\":[],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":true,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p>not update anything</p>\"}]",
                yapiFormatter.doc2Items(requests[1]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"id\\\": \\\"666\\\", //user id\\n        /**\\n         * user type\\n         * 1 :administration\\n         * 2 :a person, an animal or a plant\\n         * 3 :Anonymous visitor\\n         */\\n        \\\"type\\\": \\\"@pick([1,2,3])\\\",\\n        \\\"name\\\": \\\"tangcent\\\", //user name\\n        \\\"age\\\": \\\"18\\\", //user age\\n        \\\"sex\\\": \\\"1\\\",\\n        \\\"birthDay\\\": \\\"@date\\\", //user birthDay\\n        \\\"regtime\\\": \\\"@datetime\\\" //user regtime\\n    }\\n}\",\"query_path\":{\"path\":\"/user/get/{id}\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"get user info\",\"path\":\"/user/get/{id}\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[\"deprecated\"],\"req_query\":[{\"name\":\"id\",\"value\":0,\"desc\":\"user id\",\"required\":0}],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"undone\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[2]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"id\\\": \\\"666\\\", //user id\\n        /**\\n         * user type\\n         * 1 :administration\\n         * 2 :a person, an animal or a plant\\n         * 3 :Anonymous visitor\\n         */\\n        \\\"type\\\": \\\"@pick([1,2,3])\\\",\\n        \\\"name\\\": \\\"tangcent\\\", //user name\\n        \\\"age\\\": \\\"18\\\", //user age\\n        \\\"sex\\\": \\\"1\\\",\\n        \\\"birthDay\\\": \\\"@date\\\", //user birthDay\\n        \\\"regtime\\\": \\\"@datetime\\\" //user regtime\\n    }\\n}\",\"query_path\":{\"path\":\"/user/admin/add\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\n    \\\"id\\\": \\\"666\\\", //user id\\n    /**\\n     * user type\\n     * 1 :administration\\n     * 2 :a person, an animal or a plant\\n     * 3 :Anonymous visitor\\n     */\\n    \\\"type\\\": \\\"@pick([1,2,3])\\\",\\n    \\\"name\\\": \\\"tangcent\\\", //user name\\n    \\\"age\\\": \\\"18\\\", //user age\\n    \\\"sex\\\": \\\"1\\\",\\n    \\\"birthDay\\\": \\\"@date\\\", //user birthDay\\n    \\\"regtime\\\": \\\"@datetime\\\" //user regtime\\n}\",\"type\":\"static\",\"title\":\"create an user\",\"req_body_form\":[],\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\",\"queryPath\":{\"params\":[]},\"path\":\"/user/add\"},{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"id\\\": \\\"666\\\", //user id\\n        /**\\n         * user type\\n         * 1 :administration\\n         * 2 :a person, an animal or a plant\\n         * 3 :Anonymous visitor\\n         */\\n        \\\"type\\\": \\\"@pick([1,2,3])\\\",\\n        \\\"name\\\": \\\"tangcent\\\", //user name\\n        \\\"age\\\": \\\"18\\\", //user age\\n        \\\"sex\\\": \\\"1\\\",\\n        \\\"birthDay\\\": \\\"@date\\\", //user birthDay\\n        \\\"regtime\\\": \\\"@datetime\\\" //user regtime\\n    }\\n}\",\"query_path\":{\"path\":\"/user/admin/add\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\n    \\\"id\\\": \\\"666\\\", //user id\\n    /**\\n     * user type\\n     * 1 :administration\\n     * 2 :a person, an animal or a plant\\n     * 3 :Anonymous visitor\\n     */\\n    \\\"type\\\": \\\"@pick([1,2,3])\\\",\\n    \\\"name\\\": \\\"tangcent\\\", //user name\\n    \\\"age\\\": \\\"18\\\", //user age\\n    \\\"sex\\\": \\\"1\\\",\\n    \\\"birthDay\\\": \\\"@date\\\", //user birthDay\\n    \\\"regtime\\\": \\\"@datetime\\\" //user regtime\\n}\",\"type\":\"static\",\"title\":\"[admin]create an user\",\"req_body_form\":[],\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"[admin]\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"[admin]<p></p>\",\"queryPath\":{\"params\":[],\"path\":\"/user/add\"},\"path\":\"/user/admin/add\"}]",
                yapiFormatter.doc2Items(requests[3]).toJson()!!.toUnixString()
            )

            val apiCntInUserCtrl = userCtrlPsiClass.methods.size

            assertEquals(
                "[{\"res_body\":\"\\\"\\\"\",\"query_path\":{\"path\":\"/default/ctrl/name\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"current ctrl name\",\"path\":\"/default/ctrl/name\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 1]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"intArr\\\": [\\n            \\\"666\\\",\\n            \\\"666\\\"\\n        ],\\n        \\\"amount\\\": {\\n            \\\"abc\\\": \\\"str\\\",\\n            \\\"def\\\": \\\"str\\\"\\n        },\\n        \\\"strings\\\": [\\n            \\\"str\\\",\\n            \\\"str\\\"\\n        ],\\n        \\\"invalid\\\": [\\n            \\\"str\\\"\\n        ],\\n        \\\"model\\\": {\\n            \\\"shouldBeFirst\\\": \\\"str\\\",\\n            \\\"str\\\": \\\"str\\\", //string field\\n            \\\"integer\\\": \\\"666\\\", //integer field\\n            \\\"stringList\\\": \\\"str\\\", //stringList field\\n            \\\"integerArray\\\": [ //integerArray field\\n                \\\"666\\\"\\n            ],\\n            \\\"shouldIgnore\\\": \\\"str\\\",\\n            \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n            \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n            \\\"shouldBeLast\\\": \\\"str\\\",\\n            \\\"s\\\": \\\"str\\\",\\n            \\\"s2\\\": \\\"str\\\"\\n        },\\n        \\\"modelList\\\": [\\n            {\\n                \\\"shouldBeFirst\\\": \\\"str\\\",\\n                \\\"str\\\": \\\"str\\\", //string field\\n                \\\"integer\\\": \\\"666\\\", //integer field\\n                \\\"stringList\\\": [ //stringList field\\n                    \\\"str\\\"\\n                ],\\n                \\\"integerArray\\\": [ //integerArray field\\n                    \\\"666\\\"\\n                ],\\n                \\\"shouldIgnore\\\": \\\"str\\\",\\n                \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n                \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n                \\\"shouldBeLast\\\": \\\"str\\\"\\n            }\\n        ]\\n    }\\n}\",\"query_path\":{\"path\":\"/default/query\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"call with query\",\"path\":\"/default/query\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[{\"name\":\"intArr[0]\",\"value\":123,\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"intArr[1]\",\"value\":456,\"example\":\"456\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.abc\",\"value\":\"123\",\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.def\",\"value\":\"456\",\"example\":\"456\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[0]\",\"value\":\"abc\",\"example\":\"abc\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[1]\",\"value\":\"123\",\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"invalid[0]\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldBeFirst\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.str\",\"value\":\"\",\"desc\":\"string field\",\"required\":0},{\"name\":\"model.integer\",\"value\":0,\"desc\":\"integer field\",\"required\":0},{\"name\":\"model.stringList\",\"value\":\"abc\",\"example\":\"abc\",\"desc\":\"stringList field\",\"required\":0},{\"name\":\"model.integerArray[0]\",\"value\":0,\"desc\":\"integerArray field\",\"required\":0},{\"name\":\"model.shouldIgnore\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldIgnoreByGetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldIgnoreBySetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldBeLast\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.s\",\"value\":\"aaa\",\"example\":\"aaa\",\"desc\":\"\",\"required\":0},{\"name\":\"model.s2\",\"value\":\"bbb\",\"example\":\"bbb\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldBeFirst\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].str\",\"value\":\"\",\"desc\":\"string field\",\"required\":0},{\"name\":\"modelList[0].integer\",\"value\":0,\"desc\":\"integer field\",\"required\":0},{\"name\":\"modelList[0].stringList[0]\",\"value\":\"\",\"desc\":\"stringList field\",\"required\":0},{\"name\":\"modelList[0].integerArray[0]\",\"value\":0,\"desc\":\"integerArray field\",\"required\":0},{\"name\":\"modelList[0].shouldIgnore\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldIgnoreByGetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldIgnoreBySetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldBeLast\",\"value\":\"\",\"desc\":\"\",\"required\":0}],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 2]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"intArr\\\": [\\n            \\\"666\\\",\\n            \\\"666\\\"\\n        ],\\n        \\\"amount\\\": {\\n            \\\"abc\\\": \\\"str\\\",\\n            \\\"def\\\": \\\"str\\\"\\n        },\\n        \\\"strings\\\": [\\n            \\\"str\\\",\\n            \\\"str\\\"\\n        ],\\n        \\\"invalid\\\": [\\n            \\\"str\\\"\\n        ],\\n        \\\"model\\\": {\\n            \\\"shouldBeFirst\\\": \\\"str\\\",\\n            \\\"str\\\": \\\"str\\\", //string field\\n            \\\"integer\\\": \\\"666\\\", //integer field\\n            \\\"stringList\\\": \\\"str\\\", //stringList field\\n            \\\"integerArray\\\": [ //integerArray field\\n                \\\"666\\\"\\n            ],\\n            \\\"shouldIgnore\\\": \\\"str\\\",\\n            \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n            \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n            \\\"shouldBeLast\\\": \\\"str\\\",\\n            \\\"s\\\": \\\"str\\\",\\n            \\\"s2\\\": \\\"str\\\"\\n        },\\n        \\\"modelList\\\": [\\n            {\\n                \\\"shouldBeFirst\\\": \\\"str\\\",\\n                \\\"str\\\": \\\"str\\\", //string field\\n                \\\"integer\\\": \\\"666\\\", //integer field\\n                \\\"stringList\\\": [ //stringList field\\n                    \\\"str\\\"\\n                ],\\n                \\\"integerArray\\\": [ //integerArray field\\n                    \\\"666\\\"\\n                ],\\n                \\\"shouldIgnore\\\": \\\"str\\\",\\n                \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n                \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n                \\\"shouldBeLast\\\": \\\"str\\\"\\n            }\\n        ]\\n    }\\n}\",\"query_path\":{\"path\":\"/default/form\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"form\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"call with form\",\"req_body_form\":[{\"name\":\"intArr[0]\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"intArr[1]\",\"example\":\"456\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.abc\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.def\",\"example\":\"456\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[0]\",\"example\":\"abc\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[1]\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"invalid[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldBeFirst\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.str\",\"type\":\"text\",\"required\":0,\"desc\":\"string field\"},{\"name\":\"model.integer\",\"type\":\"text\",\"required\":0,\"desc\":\"integer field\"},{\"name\":\"model.stringList\",\"example\":\"abc\",\"type\":\"text\",\"required\":0,\"desc\":\"stringList field\"},{\"name\":\"model.integerArray[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"integerArray field\"},{\"name\":\"model.shouldIgnore\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldIgnoreByGetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldIgnoreBySetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldBeLast\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.s\",\"example\":\"aaa\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.s2\",\"example\":\"bbb\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldBeFirst\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].str\",\"type\":\"text\",\"required\":0,\"desc\":\"string field\"},{\"name\":\"modelList[0].integer\",\"type\":\"text\",\"required\":0,\"desc\":\"integer field\"},{\"name\":\"modelList[0].stringList[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"stringList field\"},{\"name\":\"modelList[0].integerArray[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"integerArray field\"},{\"name\":\"modelList[0].shouldIgnore\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldIgnoreByGetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldIgnoreBySetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldBeLast\",\"type\":\"text\",\"required\":0,\"desc\":\"\"}],\"path\":\"/default/form\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"multipart/form-data\",\"example\":\"multipart/form-data\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 3]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"intArr\\\": [\\n            \\\"666\\\",\\n            \\\"666\\\"\\n        ],\\n        \\\"amount\\\": {\\n            \\\"abc\\\": \\\"str\\\",\\n            \\\"def\\\": \\\"str\\\"\\n        },\\n        \\\"strings\\\": [\\n            \\\"str\\\",\\n            \\\"str\\\"\\n        ],\\n        \\\"invalid\\\": [\\n            \\\"str\\\"\\n        ],\\n        \\\"model\\\": {\\n            \\\"shouldBeFirst\\\": \\\"str\\\",\\n            \\\"str\\\": \\\"str\\\", //string field\\n            \\\"integer\\\": \\\"666\\\", //integer field\\n            \\\"stringList\\\": \\\"str\\\", //stringList field\\n            \\\"integerArray\\\": [ //integerArray field\\n                \\\"666\\\"\\n            ],\\n            \\\"shouldIgnore\\\": \\\"str\\\",\\n            \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n            \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n            \\\"shouldBeLast\\\": \\\"str\\\",\\n            \\\"s\\\": \\\"str\\\",\\n            \\\"s2\\\": \\\"str\\\"\\n        },\\n        \\\"modelList\\\": [\\n            {\\n                \\\"shouldBeFirst\\\": \\\"str\\\",\\n                \\\"str\\\": \\\"str\\\", //string field\\n                \\\"integer\\\": \\\"666\\\", //integer field\\n                \\\"stringList\\\": [ //stringList field\\n                    \\\"str\\\"\\n                ],\\n                \\\"integerArray\\\": [ //integerArray field\\n                    \\\"666\\\"\\n                ],\\n                \\\"shouldIgnore\\\": \\\"str\\\",\\n                \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n                \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n                \\\"shouldBeLast\\\": \\\"str\\\"\\n            }\\n        ]\\n    }\\n}\",\"query_path\":{\"path\":\"/default/body\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\n    \\\"intArr\\\": [\\n        \\\"666\\\",\\n        \\\"666\\\"\\n    ],\\n    \\\"amount\\\": {\\n        \\\"abc\\\": \\\"str\\\",\\n        \\\"def\\\": \\\"str\\\"\\n    },\\n    \\\"strings\\\": [\\n        \\\"str\\\",\\n        \\\"str\\\"\\n    ],\\n    \\\"invalid\\\": [\\n        \\\"str\\\"\\n    ],\\n    \\\"model\\\": {\\n        \\\"shouldBeFirst\\\": \\\"str\\\",\\n        \\\"str\\\": \\\"str\\\", //string field\\n        \\\"integer\\\": \\\"666\\\", //integer field\\n        \\\"stringList\\\": \\\"str\\\", //stringList field\\n        \\\"integerArray\\\": [ //integerArray field\\n            \\\"666\\\"\\n        ],\\n        \\\"shouldIgnore\\\": \\\"str\\\",\\n        \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n        \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n        \\\"shouldBeLast\\\": \\\"str\\\",\\n        \\\"s\\\": \\\"str\\\",\\n        \\\"s2\\\": \\\"str\\\"\\n    },\\n    \\\"modelList\\\": [\\n        {\\n            \\\"shouldBeFirst\\\": \\\"str\\\",\\n            \\\"str\\\": \\\"str\\\", //string field\\n            \\\"integer\\\": \\\"666\\\", //integer field\\n            \\\"stringList\\\": [ //stringList field\\n                \\\"str\\\"\\n            ],\\n            \\\"integerArray\\\": [ //integerArray field\\n                \\\"666\\\"\\n            ],\\n            \\\"shouldIgnore\\\": \\\"str\\\",\\n            \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n            \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n            \\\"shouldBeLast\\\": \\\"str\\\"\\n        }\\n    ]\\n}\",\"type\":\"static\",\"title\":\"call with body\",\"req_body_form\":[],\"path\":\"/default/body\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 4]).toJson()!!.toUnixString()
            )
        }
    }

    class YapiFormatterWithDemoTest : YapiFormatterTest() {
        override fun customConfig(): String {

            return """${super.customConfig()}
                    method.additional.header[!@com.itangcent.annotation.Public]={name: "token",value: "",desc: "auth token",required:true, demo:"123456"}
                    #[converts]*
                    #The ObjectId and Date will be parsed as strings
                    json.rule.convert[org.bson.types.ObjectId]=java.lang.String
                    json.rule.convert[java.util.Date]=java.lang.String
                    json.rule.convert[java.sql.Timestamp]=java.lang.String
                    json.rule.convert[java.time.LocalDateTime]=java.lang.String
                    json.rule.convert[java.time.LocalDate]=java.lang.String
                    field.demo=#demo
                    api.open=@com.itangcent.annotation.Public
                    api.status[#undone]=undone
                    api.tag[@java.lang.Deprecated]=deprecated
                   """
        }

        /**
         * use json-schema by default
         */
        fun testDoc2Items() {
            val requests = ArrayList<Request>()
            val boundary = actionContext.createBoundary()
            classExporter.export(userCtrlPsiClass, requestOnly {
                requests.add(it)
            })
            boundary.waitComplete(false)
            classExporter.export(defaultCtrlPsiClass, requestOnly {
                requests.add(it)
            })
            boundary.waitComplete()
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/ctrl/name\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"current ctrl name\",\"path\":\"/user/ctrl/name\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[0]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/greeting\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"say hello\",\"path\":\"/user/greeting\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"not update anything\",\"req_headers\":[],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":true,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p>not update anything</p>\"}]",
                yapiFormatter.doc2Items(requests[1]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/get/{id}\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"get user info\",\"path\":\"/user/get/{id}\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[\"deprecated\"],\"req_query\":[{\"name\":\"id\",\"value\":0,\"desc\":\"user id\",\"required\":0}],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"undone\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[2]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/admin/add\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"type\":\"static\",\"title\":\"create an user\",\"req_body_form\":[],\"req_body_is_json_schema\":true,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\",\"queryPath\":{\"params\":[]},\"path\":\"/user/add\"},{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/user/admin/add\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"id\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"user id\\\",\\\"default\\\":\\\"0\\\"},\\\"type\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@pick([1,2,3])\\\"},\\\"description\\\":\\\"user type\\\",\\\"enum\\\":[1,2,3],\\\"enumDesc\\\":\\\"1 :administration\\\\n2 :a person, an animal or a plant\\\\n3 :Anonymous visitor\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"tangcent\\\"},\\\"description\\\":\\\"user name\\\",\\\"default\\\":\\\"tangcent\\\"},\\\"age\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"18\\\"},\\\"description\\\":\\\"user age\\\"},\\\"sex\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"1\\\"},\\\"description\\\":\\\"\\\"},\\\"birthDay\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@date\\\"},\\\"description\\\":\\\"user birthDay\\\"},\\\"regtime\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"@datetime\\\"},\\\"description\\\":\\\"user regtime\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"type\":\"static\",\"title\":\"[admin]create an user\",\"req_body_form\":[],\"req_body_is_json_schema\":true,\"__v\":0,\"markdown\":\"[admin]\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"[admin]<p></p>\",\"queryPath\":{\"params\":[],\"path\":\"/user/add\"},\"path\":\"/user/admin/add\"}]",
                yapiFormatter.doc2Items(requests[3]).toJson()
            )
            val apiCntInUserCtrl = userCtrlPsiClass.methods.size
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/ctrl/name\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"current ctrl name\",\"path\":\"/default/ctrl/name\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 1]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"},\\\"aaa\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"ddd\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/query\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"call with query\",\"path\":\"/default/query\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[{\"name\":\"intArr[0]\",\"value\":123,\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"intArr[1]\",\"value\":456,\"example\":\"456\",\"desc\":\"\",\"required\":0},{\"name\":\"intArr[2]\",\"value\":666,\"example\":\"666\",\"desc\":\"\",\"required\":0},{\"name\":\"intArr[3]\",\"value\":888,\"example\":\"888\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.abc\",\"value\":\"123\",\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.def\",\"value\":\"456\",\"example\":\"456\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.aaa\",\"value\":\"666\",\"example\":\"666\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.ddd\",\"value\":\"888\",\"example\":\"888\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[0]\",\"value\":\"abc\",\"example\":\"abc\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[1]\",\"value\":\"123\",\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[2]\",\"value\":\"aaa\",\"example\":\"aaa\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[3]\",\"value\":\"666\",\"example\":\"666\",\"desc\":\"\",\"required\":0},{\"name\":\"invalid[0]\",\"value\":\"\",\"example\":\"{\\\"aaa\\\",\\\"666\\\"]\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldBeFirst\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.str\",\"value\":\"\",\"desc\":\"string field\",\"required\":0},{\"name\":\"model.integer\",\"value\":0,\"desc\":\"integer field\",\"required\":0},{\"name\":\"model.stringList\",\"value\":\"abc\",\"example\":\"abc\",\"desc\":\"stringList field\",\"required\":0},{\"name\":\"model.integerArray[0]\",\"value\":0,\"desc\":\"integerArray field\",\"required\":0},{\"name\":\"model.shouldIgnore\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldIgnoreByGetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldIgnoreBySetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldBeLast\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.s\",\"value\":\"aaa\",\"example\":\"aaa\",\"desc\":\"\",\"required\":0},{\"name\":\"model.s2\",\"value\":\"bbb\",\"example\":\"bbb\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldBeFirst\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].str\",\"value\":\"\",\"desc\":\"string field\",\"required\":0},{\"name\":\"modelList[0].integer\",\"value\":0,\"desc\":\"integer field\",\"required\":0},{\"name\":\"modelList[0].stringList[0]\",\"value\":\"\",\"desc\":\"stringList field\",\"required\":0},{\"name\":\"modelList[0].integerArray[0]\",\"value\":0,\"desc\":\"integerArray field\",\"required\":0},{\"name\":\"modelList[0].shouldIgnore\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldIgnoreByGetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldIgnoreBySetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldBeLast\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[1].s\",\"value\":\"aaa\",\"example\":\"aaa\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[1].s2\",\"value\":\"bbb\",\"example\":\"bbb\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[1].stringList\",\"value\":\"abc\",\"example\":\"abc\",\"desc\":\"\",\"required\":0}],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 2]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"},\\\"aaa\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"ddd\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/form\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"form\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"call with form\",\"req_body_form\":[{\"name\":\"intArr[0]\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"intArr[1]\",\"example\":\"456\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"intArr[2]\",\"example\":\"666\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"intArr[3]\",\"example\":\"888\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.abc\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.def\",\"example\":\"456\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.aaa\",\"example\":\"666\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.ddd\",\"example\":\"888\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[0]\",\"example\":\"abc\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[1]\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[2]\",\"example\":\"aaa\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[3]\",\"example\":\"666\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"invalid[0]\",\"example\":\"{\\\"aaa\\\",\\\"666\\\"]\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldBeFirst\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.str\",\"type\":\"text\",\"required\":0,\"desc\":\"string field\"},{\"name\":\"model.integer\",\"type\":\"text\",\"required\":0,\"desc\":\"integer field\"},{\"name\":\"model.stringList\",\"example\":\"abc\",\"type\":\"text\",\"required\":0,\"desc\":\"stringList field\"},{\"name\":\"model.integerArray[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"integerArray field\"},{\"name\":\"model.shouldIgnore\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldIgnoreByGetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldIgnoreBySetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldBeLast\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.s\",\"example\":\"aaa\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.s2\",\"example\":\"bbb\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldBeFirst\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].str\",\"type\":\"text\",\"required\":0,\"desc\":\"string field\"},{\"name\":\"modelList[0].integer\",\"type\":\"text\",\"required\":0,\"desc\":\"integer field\"},{\"name\":\"modelList[0].stringList[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"stringList field\"},{\"name\":\"modelList[0].integerArray[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"integerArray field\"},{\"name\":\"modelList[0].shouldIgnore\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldIgnoreByGetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldIgnoreBySetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldBeLast\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[1].s\",\"example\":\"aaa\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[1].s2\",\"example\":\"bbb\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[1].stringList\",\"example\":\"abc\",\"type\":\"text\",\"required\":0,\"desc\":\"\"}],\"path\":\"/default/form\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"multipart/form-data\",\"example\":\"multipart/form-data\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 3]).toJson()
            )
            assertEquals(
                "[{\"res_body\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"code\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"200\\\"},\\\"description\\\":\\\"response code\\\"},\\\"msg\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"ok\\\"},\\\"description\\\":\\\"message\\\"},\\\"data\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"},\\\"aaa\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"ddd\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"description\\\":\\\"response data\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"query_path\":{\"path\":\"/default/body\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"intArr\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[123, 456]\\\"},\\\"amount\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"abc\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"123\\\"},\\\"def\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"456\\\"},\\\"aaa\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"ddd\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"abc\\\\\\\":\\\\\\\"123\\\\\\\",\\\\\\\"def\\\\\\\":\\\\\\\"456\\\\\\\"}\\\"},\\\"strings\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"]\\\"},\\\"invalid\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[\\\\\\\"abc\\\\\\\",\\\\\\\"123\\\\\\\"}\\\"},\\\"model\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"stringList field\\\",\\\"default\\\":\\\"abc\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"s\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"aaa\\\"},\\\"s2\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"default\\\":\\\"bbb\\\"}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}\\\"},\\\"modelList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"shouldBeFirst\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"str\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"string field\\\"},\\\"integer\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"},\\\"description\\\":\\\"integer field\\\"},\\\"stringList\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"}},\\\"description\\\":\\\"stringList field\\\"},\\\"integerArray\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"mock\\\":{\\\"mock\\\":\\\"666\\\"}},\\\"description\\\":\\\"integerArray field\\\"},\\\"shouldIgnore\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreByGetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldIgnoreBySetter\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"},\\\"shouldBeLast\\\":{\\\"type\\\":\\\"string\\\",\\\"mock\\\":{\\\"mock\\\":\\\"str\\\"},\\\"description\\\":\\\"\\\"}}},\\\"description\\\":\\\"\\\",\\\"default\\\":\\\"[{\\\\\\\"s\\\\\\\":\\\\\\\"aaa\\\\\\\",\\\\\\\"s2\\\\\\\":\\\\\\\"bbb\\\\\\\",\\\\\\\"stringList\\\\\\\":\\\\\\\"abc\\\\\\\"}}\\\"}},\\\"\$schema\\\":\\\"http://json-schema.org/draft-04/schema#\\\"}\",\"type\":\"static\",\"title\":\"call with body\",\"req_body_form\":[],\"path\":\"/default/body\",\"req_body_is_json_schema\":true,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":true,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 4]).toJson()
            )
        }

        /**
         * use json5
         */
        fun testDoc2ItemsWithJson5() {
            settings.yapiReqBodyJson5 = true
            settings.yapiResBodyJson5 = true
            val requests = ArrayList<Request>()
            val boundary = actionContext.createBoundary()
            classExporter.export(userCtrlPsiClass, requestOnly {
                requests.add(it)
            })
            boundary.waitComplete(false)
            classExporter.export(defaultCtrlPsiClass, requestOnly {
                requests.add(it)
            })
            boundary.waitComplete()
            assertEquals(
                "[{\"res_body\":\"\\\"\\\"\",\"query_path\":{\"path\":\"/user/ctrl/name\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"current ctrl name\",\"path\":\"/user/ctrl/name\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[0]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"\\\"\\\"\",\"query_path\":{\"path\":\"/user/greeting\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"say hello\",\"path\":\"/user/greeting\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"not update anything\",\"req_headers\":[],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":true,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p>not update anything</p>\"}]",
                yapiFormatter.doc2Items(requests[1]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"id\\\": \\\"666\\\", //user id\\n        /**\\n         * user type\\n         * 1 :administration\\n         * 2 :a person, an animal or a plant\\n         * 3 :Anonymous visitor\\n         */\\n        \\\"type\\\": \\\"@pick([1,2,3])\\\",\\n        \\\"name\\\": \\\"tangcent\\\", //user name\\n        \\\"age\\\": \\\"18\\\", //user age\\n        \\\"sex\\\": \\\"1\\\",\\n        \\\"birthDay\\\": \\\"@date\\\", //user birthDay\\n        \\\"regtime\\\": \\\"@datetime\\\" //user regtime\\n    }\\n}\",\"query_path\":{\"path\":\"/user/get/{id}\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"get user info\",\"path\":\"/user/get/{id}\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[\"deprecated\"],\"req_query\":[{\"name\":\"id\",\"value\":0,\"desc\":\"user id\",\"required\":0}],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"undone\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[2]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"id\\\": \\\"666\\\", //user id\\n        /**\\n         * user type\\n         * 1 :administration\\n         * 2 :a person, an animal or a plant\\n         * 3 :Anonymous visitor\\n         */\\n        \\\"type\\\": \\\"@pick([1,2,3])\\\",\\n        \\\"name\\\": \\\"tangcent\\\", //user name\\n        \\\"age\\\": \\\"18\\\", //user age\\n        \\\"sex\\\": \\\"1\\\",\\n        \\\"birthDay\\\": \\\"@date\\\", //user birthDay\\n        \\\"regtime\\\": \\\"@datetime\\\" //user regtime\\n    }\\n}\",\"query_path\":{\"path\":\"/user/admin/add\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\n    \\\"id\\\": \\\"666\\\", //user id\\n    /**\\n     * user type\\n     * 1 :administration\\n     * 2 :a person, an animal or a plant\\n     * 3 :Anonymous visitor\\n     */\\n    \\\"type\\\": \\\"@pick([1,2,3])\\\",\\n    \\\"name\\\": \\\"tangcent\\\", //user name\\n    \\\"age\\\": \\\"18\\\", //user age\\n    \\\"sex\\\": \\\"1\\\",\\n    \\\"birthDay\\\": \\\"@date\\\", //user birthDay\\n    \\\"regtime\\\": \\\"@datetime\\\" //user regtime\\n}\",\"type\":\"static\",\"title\":\"create an user\",\"req_body_form\":[],\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\",\"queryPath\":{\"params\":[]},\"path\":\"/user/add\"},{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"id\\\": \\\"666\\\", //user id\\n        /**\\n         * user type\\n         * 1 :administration\\n         * 2 :a person, an animal or a plant\\n         * 3 :Anonymous visitor\\n         */\\n        \\\"type\\\": \\\"@pick([1,2,3])\\\",\\n        \\\"name\\\": \\\"tangcent\\\", //user name\\n        \\\"age\\\": \\\"18\\\", //user age\\n        \\\"sex\\\": \\\"1\\\",\\n        \\\"birthDay\\\": \\\"@date\\\", //user birthDay\\n        \\\"regtime\\\": \\\"@datetime\\\" //user regtime\\n    }\\n}\",\"query_path\":{\"path\":\"/user/admin/add\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\n    \\\"id\\\": \\\"666\\\", //user id\\n    /**\\n     * user type\\n     * 1 :administration\\n     * 2 :a person, an animal or a plant\\n     * 3 :Anonymous visitor\\n     */\\n    \\\"type\\\": \\\"@pick([1,2,3])\\\",\\n    \\\"name\\\": \\\"tangcent\\\", //user name\\n    \\\"age\\\": \\\"18\\\", //user age\\n    \\\"sex\\\": \\\"1\\\",\\n    \\\"birthDay\\\": \\\"@date\\\", //user birthDay\\n    \\\"regtime\\\": \\\"@datetime\\\" //user regtime\\n}\",\"type\":\"static\",\"title\":\"[admin]create an user\",\"req_body_form\":[],\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"[admin]\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"[admin]<p></p>\",\"queryPath\":{\"params\":[],\"path\":\"/user/add\"},\"path\":\"/user/admin/add\"}]",
                yapiFormatter.doc2Items(requests[3]).toJson()!!.toUnixString()
            )

            val apiCntInUserCtrl = userCtrlPsiClass.methods.size

            assertEquals(
                "[{\"res_body\":\"\\\"\\\"\",\"query_path\":{\"path\":\"/default/ctrl/name\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"current ctrl name\",\"path\":\"/default/ctrl/name\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 1]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"intArr\\\": [\\n            \\\"666\\\",\\n            \\\"666\\\",\\n            \\\"666\\\",\\n            \\\"666\\\"\\n        ],\\n        \\\"amount\\\": {\\n            \\\"abc\\\": \\\"str\\\",\\n            \\\"def\\\": \\\"str\\\",\\n            \\\"aaa\\\": \\\"str\\\",\\n            \\\"ddd\\\": \\\"str\\\"\\n        },\\n        \\\"strings\\\": [\\n            \\\"str\\\",\\n            \\\"str\\\",\\n            \\\"str\\\",\\n            \\\"str\\\"\\n        ],\\n        \\\"invalid\\\": [\\n            \\\"str\\\"\\n        ],\\n        \\\"model\\\": {\\n            \\\"shouldBeFirst\\\": \\\"str\\\",\\n            \\\"str\\\": \\\"str\\\", //string field\\n            \\\"integer\\\": \\\"666\\\", //integer field\\n            \\\"stringList\\\": \\\"str\\\", //stringList field\\n            \\\"integerArray\\\": [ //integerArray field\\n                \\\"666\\\"\\n            ],\\n            \\\"shouldIgnore\\\": \\\"str\\\",\\n            \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n            \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n            \\\"shouldBeLast\\\": \\\"str\\\",\\n            \\\"s\\\": \\\"str\\\",\\n            \\\"s2\\\": \\\"str\\\"\\n        },\\n        \\\"modelList\\\": [\\n            {\\n                \\\"shouldBeFirst\\\": \\\"str\\\",\\n                \\\"str\\\": \\\"str\\\", //string field\\n                \\\"integer\\\": \\\"666\\\", //integer field\\n                \\\"stringList\\\": [ //stringList field\\n                    \\\"str\\\"\\n                ],\\n                \\\"integerArray\\\": [ //integerArray field\\n                    \\\"666\\\"\\n                ],\\n                \\\"shouldIgnore\\\": \\\"str\\\",\\n                \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n                \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n                \\\"shouldBeLast\\\": \\\"str\\\"\\n            },\\n            {\\n                \\\"s\\\": \\\"str\\\",\\n                \\\"s2\\\": \\\"str\\\",\\n                \\\"stringList\\\": \\\"str\\\"\\n            }\\n        ]\\n    }\\n}\",\"query_path\":{\"path\":\"/default/query\",\"params\":[]},\"method\":\"GET\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"call with query\",\"path\":\"/default/query\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[{\"name\":\"intArr[0]\",\"value\":123,\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"intArr[1]\",\"value\":456,\"example\":\"456\",\"desc\":\"\",\"required\":0},{\"name\":\"intArr[2]\",\"value\":666,\"example\":\"666\",\"desc\":\"\",\"required\":0},{\"name\":\"intArr[3]\",\"value\":888,\"example\":\"888\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.abc\",\"value\":\"123\",\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.def\",\"value\":\"456\",\"example\":\"456\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.aaa\",\"value\":\"666\",\"example\":\"666\",\"desc\":\"\",\"required\":0},{\"name\":\"amount.ddd\",\"value\":\"888\",\"example\":\"888\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[0]\",\"value\":\"abc\",\"example\":\"abc\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[1]\",\"value\":\"123\",\"example\":\"123\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[2]\",\"value\":\"aaa\",\"example\":\"aaa\",\"desc\":\"\",\"required\":0},{\"name\":\"strings[3]\",\"value\":\"666\",\"example\":\"666\",\"desc\":\"\",\"required\":0},{\"name\":\"invalid[0]\",\"value\":\"\",\"example\":\"{\\\"aaa\\\",\\\"666\\\"]\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldBeFirst\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.str\",\"value\":\"\",\"desc\":\"string field\",\"required\":0},{\"name\":\"model.integer\",\"value\":0,\"desc\":\"integer field\",\"required\":0},{\"name\":\"model.stringList\",\"value\":\"abc\",\"example\":\"abc\",\"desc\":\"stringList field\",\"required\":0},{\"name\":\"model.integerArray[0]\",\"value\":0,\"desc\":\"integerArray field\",\"required\":0},{\"name\":\"model.shouldIgnore\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldIgnoreByGetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldIgnoreBySetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.shouldBeLast\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"model.s\",\"value\":\"aaa\",\"example\":\"aaa\",\"desc\":\"\",\"required\":0},{\"name\":\"model.s2\",\"value\":\"bbb\",\"example\":\"bbb\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldBeFirst\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].str\",\"value\":\"\",\"desc\":\"string field\",\"required\":0},{\"name\":\"modelList[0].integer\",\"value\":0,\"desc\":\"integer field\",\"required\":0},{\"name\":\"modelList[0].stringList[0]\",\"value\":\"\",\"desc\":\"stringList field\",\"required\":0},{\"name\":\"modelList[0].integerArray[0]\",\"value\":0,\"desc\":\"integerArray field\",\"required\":0},{\"name\":\"modelList[0].shouldIgnore\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldIgnoreByGetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldIgnoreBySetter\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[0].shouldBeLast\",\"value\":\"\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[1].s\",\"value\":\"aaa\",\"example\":\"aaa\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[1].s2\",\"value\":\"bbb\",\"example\":\"bbb\",\"desc\":\"\",\"required\":0},{\"name\":\"modelList[1].stringList\",\"value\":\"abc\",\"example\":\"abc\",\"desc\":\"\",\"required\":0}],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 2]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"intArr\\\": [\\n            \\\"666\\\",\\n            \\\"666\\\",\\n            \\\"666\\\",\\n            \\\"666\\\"\\n        ],\\n        \\\"amount\\\": {\\n            \\\"abc\\\": \\\"str\\\",\\n            \\\"def\\\": \\\"str\\\",\\n            \\\"aaa\\\": \\\"str\\\",\\n            \\\"ddd\\\": \\\"str\\\"\\n        },\\n        \\\"strings\\\": [\\n            \\\"str\\\",\\n            \\\"str\\\",\\n            \\\"str\\\",\\n            \\\"str\\\"\\n        ],\\n        \\\"invalid\\\": [\\n            \\\"str\\\"\\n        ],\\n        \\\"model\\\": {\\n            \\\"shouldBeFirst\\\": \\\"str\\\",\\n            \\\"str\\\": \\\"str\\\", //string field\\n            \\\"integer\\\": \\\"666\\\", //integer field\\n            \\\"stringList\\\": \\\"str\\\", //stringList field\\n            \\\"integerArray\\\": [ //integerArray field\\n                \\\"666\\\"\\n            ],\\n            \\\"shouldIgnore\\\": \\\"str\\\",\\n            \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n            \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n            \\\"shouldBeLast\\\": \\\"str\\\",\\n            \\\"s\\\": \\\"str\\\",\\n            \\\"s2\\\": \\\"str\\\"\\n        },\\n        \\\"modelList\\\": [\\n            {\\n                \\\"shouldBeFirst\\\": \\\"str\\\",\\n                \\\"str\\\": \\\"str\\\", //string field\\n                \\\"integer\\\": \\\"666\\\", //integer field\\n                \\\"stringList\\\": [ //stringList field\\n                    \\\"str\\\"\\n                ],\\n                \\\"integerArray\\\": [ //integerArray field\\n                    \\\"666\\\"\\n                ],\\n                \\\"shouldIgnore\\\": \\\"str\\\",\\n                \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n                \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n                \\\"shouldBeLast\\\": \\\"str\\\"\\n            },\\n            {\\n                \\\"s\\\": \\\"str\\\",\\n                \\\"s2\\\": \\\"str\\\",\\n                \\\"stringList\\\": \\\"str\\\"\\n            }\\n        ]\\n    }\\n}\",\"query_path\":{\"path\":\"/default/form\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"form\",\"res_body_type\":\"json\",\"index\":0,\"type\":\"static\",\"title\":\"call with form\",\"req_body_form\":[{\"name\":\"intArr[0]\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"intArr[1]\",\"example\":\"456\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"intArr[2]\",\"example\":\"666\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"intArr[3]\",\"example\":\"888\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.abc\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.def\",\"example\":\"456\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.aaa\",\"example\":\"666\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"amount.ddd\",\"example\":\"888\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[0]\",\"example\":\"abc\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[1]\",\"example\":\"123\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[2]\",\"example\":\"aaa\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"strings[3]\",\"example\":\"666\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"invalid[0]\",\"example\":\"{\\\"aaa\\\",\\\"666\\\"]\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldBeFirst\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.str\",\"type\":\"text\",\"required\":0,\"desc\":\"string field\"},{\"name\":\"model.integer\",\"type\":\"text\",\"required\":0,\"desc\":\"integer field\"},{\"name\":\"model.stringList\",\"example\":\"abc\",\"type\":\"text\",\"required\":0,\"desc\":\"stringList field\"},{\"name\":\"model.integerArray[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"integerArray field\"},{\"name\":\"model.shouldIgnore\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldIgnoreByGetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldIgnoreBySetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.shouldBeLast\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.s\",\"example\":\"aaa\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"model.s2\",\"example\":\"bbb\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldBeFirst\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].str\",\"type\":\"text\",\"required\":0,\"desc\":\"string field\"},{\"name\":\"modelList[0].integer\",\"type\":\"text\",\"required\":0,\"desc\":\"integer field\"},{\"name\":\"modelList[0].stringList[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"stringList field\"},{\"name\":\"modelList[0].integerArray[0]\",\"type\":\"text\",\"required\":0,\"desc\":\"integerArray field\"},{\"name\":\"modelList[0].shouldIgnore\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldIgnoreByGetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldIgnoreBySetter\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[0].shouldBeLast\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[1].s\",\"example\":\"aaa\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[1].s2\",\"example\":\"bbb\",\"type\":\"text\",\"required\":0,\"desc\":\"\"},{\"name\":\"modelList[1].stringList\",\"example\":\"abc\",\"type\":\"text\",\"required\":0,\"desc\":\"\"}],\"path\":\"/default/form\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"multipart/form-data\",\"example\":\"multipart/form-data\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 3]).toJson()!!.toUnixString()
            )
            assertEquals(
                "[{\"res_body\":\"{\\n    \\\"code\\\": \\\"200\\\", //response code\\n    \\\"msg\\\": \\\"ok\\\", //message\\n    \\\"data\\\": { //response data\\n        \\\"intArr\\\": [\\n            \\\"666\\\",\\n            \\\"666\\\",\\n            \\\"666\\\",\\n            \\\"666\\\"\\n        ],\\n        \\\"amount\\\": {\\n            \\\"abc\\\": \\\"str\\\",\\n            \\\"def\\\": \\\"str\\\",\\n            \\\"aaa\\\": \\\"str\\\",\\n            \\\"ddd\\\": \\\"str\\\"\\n        },\\n        \\\"strings\\\": [\\n            \\\"str\\\",\\n            \\\"str\\\",\\n            \\\"str\\\",\\n            \\\"str\\\"\\n        ],\\n        \\\"invalid\\\": [\\n            \\\"str\\\"\\n        ],\\n        \\\"model\\\": {\\n            \\\"shouldBeFirst\\\": \\\"str\\\",\\n            \\\"str\\\": \\\"str\\\", //string field\\n            \\\"integer\\\": \\\"666\\\", //integer field\\n            \\\"stringList\\\": \\\"str\\\", //stringList field\\n            \\\"integerArray\\\": [ //integerArray field\\n                \\\"666\\\"\\n            ],\\n            \\\"shouldIgnore\\\": \\\"str\\\",\\n            \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n            \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n            \\\"shouldBeLast\\\": \\\"str\\\",\\n            \\\"s\\\": \\\"str\\\",\\n            \\\"s2\\\": \\\"str\\\"\\n        },\\n        \\\"modelList\\\": [\\n            {\\n                \\\"shouldBeFirst\\\": \\\"str\\\",\\n                \\\"str\\\": \\\"str\\\", //string field\\n                \\\"integer\\\": \\\"666\\\", //integer field\\n                \\\"stringList\\\": [ //stringList field\\n                    \\\"str\\\"\\n                ],\\n                \\\"integerArray\\\": [ //integerArray field\\n                    \\\"666\\\"\\n                ],\\n                \\\"shouldIgnore\\\": \\\"str\\\",\\n                \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n                \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n                \\\"shouldBeLast\\\": \\\"str\\\"\\n            },\\n            {\\n                \\\"s\\\": \\\"str\\\",\\n                \\\"s2\\\": \\\"str\\\",\\n                \\\"stringList\\\": \\\"str\\\"\\n            }\\n        ]\\n    }\\n}\",\"query_path\":{\"path\":\"/default/body\",\"params\":[]},\"method\":\"POST\",\"req_body_type\":\"json\",\"res_body_type\":\"json\",\"index\":0,\"req_body_other\":\"{\\n    \\\"intArr\\\": [\\n        \\\"666\\\",\\n        \\\"666\\\",\\n        \\\"666\\\",\\n        \\\"666\\\"\\n    ],\\n    \\\"amount\\\": {\\n        \\\"abc\\\": \\\"str\\\",\\n        \\\"def\\\": \\\"str\\\",\\n        \\\"aaa\\\": \\\"str\\\",\\n        \\\"ddd\\\": \\\"str\\\"\\n    },\\n    \\\"strings\\\": [\\n        \\\"str\\\",\\n        \\\"str\\\",\\n        \\\"str\\\",\\n        \\\"str\\\"\\n    ],\\n    \\\"invalid\\\": [\\n        \\\"str\\\"\\n    ],\\n    \\\"model\\\": {\\n        \\\"shouldBeFirst\\\": \\\"str\\\",\\n        \\\"str\\\": \\\"str\\\", //string field\\n        \\\"integer\\\": \\\"666\\\", //integer field\\n        \\\"stringList\\\": \\\"str\\\", //stringList field\\n        \\\"integerArray\\\": [ //integerArray field\\n            \\\"666\\\"\\n        ],\\n        \\\"shouldIgnore\\\": \\\"str\\\",\\n        \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n        \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n        \\\"shouldBeLast\\\": \\\"str\\\",\\n        \\\"s\\\": \\\"str\\\",\\n        \\\"s2\\\": \\\"str\\\"\\n    },\\n    \\\"modelList\\\": [\\n        {\\n            \\\"shouldBeFirst\\\": \\\"str\\\",\\n            \\\"str\\\": \\\"str\\\", //string field\\n            \\\"integer\\\": \\\"666\\\", //integer field\\n            \\\"stringList\\\": [ //stringList field\\n                \\\"str\\\"\\n            ],\\n            \\\"integerArray\\\": [ //integerArray field\\n                \\\"666\\\"\\n            ],\\n            \\\"shouldIgnore\\\": \\\"str\\\",\\n            \\\"shouldIgnoreByGetter\\\": \\\"str\\\",\\n            \\\"shouldIgnoreBySetter\\\": \\\"str\\\",\\n            \\\"shouldBeLast\\\": \\\"str\\\"\\n        },\\n        {\\n            \\\"s\\\": \\\"str\\\",\\n            \\\"s2\\\": \\\"str\\\",\\n            \\\"stringList\\\": \\\"str\\\"\\n        }\\n    ]\\n}\",\"type\":\"static\",\"title\":\"call with body\",\"req_body_form\":[],\"path\":\"/default/body\",\"req_body_is_json_schema\":false,\"__v\":0,\"markdown\":\"\",\"req_headers\":[{\"name\":\"Content-Type\",\"value\":\"application/json\",\"example\":\"application/json\",\"required\":1},{\"name\":\"token\",\"value\":\"\",\"desc\":\"auth token\",\"example\":\"123456\",\"required\":1}],\"edit_uid\":0,\"up_time\":1618124194,\"tag\":[],\"req_query\":[],\"api_opened\":false,\"add_time\":1618124194,\"res_body_is_json_schema\":false,\"status\":\"done\",\"desc\":\"<p></p>\"}]",
                yapiFormatter.doc2Items(requests[apiCntInUserCtrl + 4]).toJson()!!.toUnixString()
            )
        }
    }
}